import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { NetworkService } from './network.service';


@Controller('network')
export class NetworkController {
  constructor(private readonly networkService: NetworkService) {}
 
  //根据宿主机ip配置子网网段
  @Post('/configSubnet')
  async configSubnet(@Body() body) {
    return this.networkService.configSubnet(body);
  }


   // 根据下发数量查询可用子网ipv4和ipv6
   @Post('/showSubnet')
   async showSubnet(@Body() body: any) {
    return this.networkService.showSubnet(body);
   }



   // 批量验证修改后的ipv4地址和ipv6地址是否可用
   @Post('batchVerify')
   async batchVerify(@Body() body:any){
    return this.networkService.batchVerify(body)
   }
}
